
#ifndef VOODOO_SHADER_HPP
#define VOODOO_SHADER_HPP

#include "Meta.hpp"

namespace VoodooShader
{
	class VOODOO_API Shader
	{
	public:
		Shader(Core * parent, std::string filename, const char ** args = NULL);
		Shader(Core * parent, CGeffect effect);

		size_t NumParams();
		Parameter * GetParam(size_t index);

	private:
		Core * mParent;
		std::string mName;
		CGeffect mEffect;

		TechniqueMap mTechniques;
		ParameterVector mParameters;
	};

	class VOODOO_API Technique
	{
	public:
		size_t NumPasses();
		Pass * GetPass(size_t index);

	private:
		Shader * mParent;
		std::string mName;
		PassVector mPasses;
		CGtechnique mTechnique;
	};

	class VOODOO_API Pass
	{
	public:
		Pass(Core * core, CGpass pass);

		const std::string & Name();
		const Texture * Target();

		CGprogram PixelProgram();
		CGprogram VertexProgram();
		CGprogram GeometryProgram();

	private:
		Technique * mParent;
		std::string mName;
		Texture * mTarget;
		CGpass mPass;

		CGprogram mPixelProgram;
		CGprogram mVertexProgram;
		CGprogram mGeometryProgram;
	}
}

#endif /*VOODOO_SHADER_HPP*/